
const Layout = () => import("@/layout/index.vue");
const dashboard = () => import("@/views/dashboard.vue");
const login = () => import("@/views/login/index.vue");
const errorPage = () => import("@/views/errorPage/404.vue");

export const constant = [
  {
    path: "/redirect",
    component: Layout,
    meta: { hidden: true },
    children: [
      {
        path: "/redirect/:path(.*)",
        component: () => import("@/views/redirect/index.vue"),
      },
    ],
  },
  {
    path: "/",
    name: "index",
    component: Layout,
    redirect: "/dashboard",
    children: [{
      path: "dashboard",
      name: "dashboard",
      component: dashboard,
      meta: {
        title: "首页",
        icon: "el-icon-House",
        affix: true
      }
    }]
  },
  {
    path: "/login",
    name: "login",
    meta: { hidden: true },
    component: login
  },
  {
    path: "/notFound",
    name: "notFound",
    meta: { hidden: true },
    component: errorPage
  },
]